home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group92c.txt / 000102_icon-group-sender _Fri Nov 13 05:19:21 1992.msg < prev    next >
Internet Message Format  |  1993-01-04  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 8 Dec 1992 09:51:52 MST
  2. Date: 13 Nov 92 05:19:21 GMT
  3. From: mercury.hsi.com!mlfarm!cs.arizona.edu!icon-group@uunet.uu.net  (President Clinton Jeffery)
  4. Subject: Re rationale for sortf()
  5. Message-Id: <199211130519.AA22161@chuckwalla.cs.arizona.edu>
  6. Sender: icon-group-request@cs.arizona.edu
  7. To: icon-group@cs.arizona.edu
  8. Status: R
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11.  
  12.    Jerry Nowlin writes:
  13. >   You can define tables with field names as key and the record index as value
  14. >   and just use that in place of field name arguments to sortf().  When you
  15. >   change record definitions you would have to change tables values.  This
  16. >   won't help with Idol unfortunately.  Maybe Idol could put extra fields at
  17. >   the end of records to avoid obscuring known index values?
  18.  
  19. An interesting thought.  There is no reason the two "extra fields" could not
  20. be put at the back.  But current default behavior notwithstanding, objects
  21. are not supposed to be transparent and allow any old function to access
  22. their internal fields; a sortf() that would be technically correct for Idol
  23. would call a procedure (method, really) to access the key, and there are real
  24. technical reasons why sortf() doesn't call back out to an Icon procedure (or
  25. Idol method) in the present implementation -- none of Icon's built-in
  26. functions do that, in fact.  Writing a built-in Icon function that calls
  27. procedures is our user-grailquest for the week; in the meantime sorters of
  28. lists of objects would do well to consider adapting Bob Alexander's elegant
  29. isort procedure from the Icon program library.
  30.